import {request} from './utils/request.js'

// 获取订单
export const getOrderList = (status) => 
	request({
		method:'GET',
		url:`/rider/order/list/${status}`
	})

// 接单
export const getOrderDelivery = (id) => 
	request({
		method:'PUT',
		url:`/rider/order/delivery/${id}`
	})

// 完成
export const completeOrder = (id) =>
	request({
		method:'PUT',
		url:`/rider/order/complete/${id}`
	})

// 取消
export const cancelOrder = (params) =>
	request({
		method:'POST',
		url:'/rider/order/cancel',
		params
	})